package com.sunspring.zdcall.controller;

import com.sunspring.zdcall.bo.DeptBo;
import com.sunspring.zdcall.common.SimpleResponse;
import com.sunspring.zdcall.mapper.master.CheckRoomMapper;
import com.sunspring.zdcall.mapper.master.ClientMapper;
import com.sunspring.zdcall.mapper.master.DeptMapper;
import com.sunspring.zdcall.mapper.master.UserMapper;
import com.sunspring.zdcall.param.ClientParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author wulei
 * @date 2019-01-09
 **/
@RestController
public class TestController {

    @Autowired
    ClientMapper clientMapper;

    @Autowired
    UserMapper userMapper;

    @GetMapping("/test")
    public SimpleResponse test() {
        Map<String, String> map = new HashMap<>();
        map.put("username", "用户名");
        map.put("password", "密码");
        map.put("sex", "性别");
        return SimpleResponse.success(map);
    }


    @GetMapping("/test2")
    public SimpleResponse test2() {
       return SimpleResponse.success(clientMapper.selectAll(new ClientParam()));
    }

    @GetMapping("/test3")
    public SimpleResponse test3() {
        return SimpleResponse.success(userMapper.selectSelective());
    }


}
